package Practice08.test4;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class TestStudent {
    public static void main(String[] args) {

        Set<Student> students = new HashSet<>();
        students.add(new Student(1,"Tom",20));
        students.add(new Student(2,"Jack",21));
        students.add(new Student(3,"John",22));
        students.add(new Student(4,"Tom",20));
        students.add(new Student(5,"John",22));

        for (Student s: students) {
            System.out.println("id:"+s.getId()+","+"name:"+s.getName()+","+"age:"+s.getAge());
        }
    }
}
